const mongoose = require("mongoose")

// 酒店数据模型
const ChatlistSchema = mongoose.Schema({
  // 用户A的id
  userAId: {
    type: mongoose.Schema.Types.ObjectId,
    require: true,
    ref: "user"
  },
  //用户B的id
  userBId: {
    type: mongoose.Schema.Types.ObjectId,
    require: true,
    ref: "user"
  },
  //聊天记录 
  chatRecordA: {
    type: Array,
  },
  
})

const Chatlist = mongoose.model("chatlist", ChatlistSchema);

module.exports = Chatlist